package thingtest.game;

public class Player {

	private Thing thingInTheGame;
	private Scenario scenarioWhereImPlaying;
	
	public Player(){
		
		thingInTheGame = new Thing();
		thingInTheGame.defineRadius(2);
		thingInTheGame.moveToThisPoint(new Vector(300,300));
		
	}
	
	public Thing associatedThing(){
		return thingInTheGame;
	}

	public void moveInDirection(Vector vector) {

		this.thingInTheGame.push(vector);
		
	}

	public void lookTowards(Vector vector) {
		
		this.thingInTheGame.faceTowards(vector);
		
	}

	public void shoot() {

		Thing thingToShoot = new Thing();
		thingToShoot.push(this.thingInTheGame.directionThisIsFacing().normalized());
		thingToShoot.moveToThisPoint(this.thingInTheGame.location().makeACopy());
		thingToShoot.defineRadius(5);
		this.scenarioWhereImPlaying.put(thingToShoot, thingToShoot.location());
		
		
	}

	public void assignTo(Scenario scenario) {
		this.scenarioWhereImPlaying = scenario;
		
	}
	
}
